home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
scripts
/
croot
< prev
next >
Wrap
Text File
|
1995-05-03
|
4KB
|
211 lines
:
# croot - display a sequence of root images, tiled and mirrored
#
# Written 11 Sep 1992 by Ronald Joe Record (rr@sco.com)
#
# Usage: croot [-m | -a | -e | -l | -f | -n | -r | -s num | -u]
#
Usage() {
echo "Usage: $PROG [-e | -j | -l | -f | -n | -r | -s num | -u]"
echo " Where : -a indicates display all types"
echo " -e indicates display Endomorphism diagrams"
echo " -f indicates display Fractal picture"
echo " -j indicates display Julia/Mandelbrot sets"
echo " -l indicates display Lyapunov diagrams"
echo " -n indicates display Nasa images"
echo " -r indicates randomly display saved pics"
echo " -s num indicates sleep of num seconds between pics"
echo " -m indicates use full screen rather than tiling"
echo " -u displays this message"
echo "\n$PROG is a shell script front-end for the X11 background"
echo "decorator xroot written by Ronald Joe Record. When invoked with"
echo "no arguments, it cycles through all of the root images."
echo "In this way, $PROG makes an excellent rolling demo.\n"
exit 1
}
DELAY=
EFLAG=
JFLAG=
LFLAG=
SFLAG=
XFLAG=
HFLAG=
MFLAG=
NFLAG=
RFLAG=
TFLAG=
SLEEP=
ENUM=10
JNUM=10
LNUM=10
MNUM=10
NNUM=10
EDIR=/usr/skunk/pics/gif/endo
JDIR=/usr/skunk/pics/gif/julia
LDIR=/usr/skunk/pics/gif/lyap
SDIR=/usr/skunk/pics/gif/spore
XDIR=/usr/skunk/pics/gif/xtopo
HDIR=/usr/skunk/pics/gif/hop
MDIR=/usr/skunk/pics/gif/fractals
NDIR=/usr/skunk/pics/gif/space
PROG=$0
[ $# = 0 ] && {
EFLAG=1
ENUM=`ls -l $EDIR | wc -l`
JFLAG=1
JNUM=`ls -l $JDIR | wc -l`
LFLAG=1
LNUM=`ls -l $LDIR | wc -l`
SFLAG=1
SNUM=`ls -l $SDIR | wc -l`
XFLAG=1
XNUM=`ls -l $XDIR | wc -l`
HFLAG=1
HNUM=`ls -l $HDIR | wc -l`
MFLAG=1
MNUM=`ls -l $MDIR | wc -l`
NFLAG=1
NNUM=`ls -l $NDIR | wc -l`
RFLAG=1
}
while case "$1" in
-m) TFLAG=-m
[ $# = 1 ] && {
EFLAG=1
ENUM=`ls -l $EDIR | wc -l`
JFLAG=1
JNUM=`ls -l $JDIR | wc -l`
LFLAG=1
LNUM=`ls -l $LDIR | wc -l`
SFLAG=1
SNUM=`ls -l $SDIR | wc -l`
XFLAG=1
XNUM=`ls -l $XDIR | wc -l`
HFLAG=1
HNUM=`ls -l $HDIR | wc -l`
MFLAG=1
MNUM=`ls -l $MDIR | wc -l`
NFLAG=1
NNUM=`ls -l $NDIR | wc -l`
RFLAG=1
}
;;
-a) EFLAG=1
ENUM=`ls -l $EDIR | wc -l`
JFLAG=1
JNUM=`ls -l $JDIR | wc -l`
LFLAG=1
LNUM=`ls -l $LDIR | wc -l`
SFLAG=1
SNUM=`ls -l $SDIR | wc -l`
XFLAG=1
XNUM=`ls -l $XDIR | wc -l`
HFLAG=1
HNUM=`ls -l $HDIR | wc -l`
MFLAG=1
MNUM=`ls -l $MDIR | wc -l`
NFLAG=1
NNUM=`ls -l $NDIR | wc -l`
RFLAG=1
;;
-e) EFLAG=1
ENUM=`ls -l $EDIR | wc -l`
;;
-l) LFLAG=1
LNUM=`ls -l $LDIR | wc -l`
;;
-f) MFLAG=1
MNUM=`ls -l $MDIR | wc -l`
;;
-j) JFLAG=1
JNUM=`ls -l $JDIR | wc -l`
;;
-n) NFLAG=1
NNUM=`ls -l $NDIR | wc -l`
;;
-r) RFLAG=1
;;
-s) DELAY=$2
[ $# = 2 ] && {
EFLAG=1
ENUM=`ls -l $EDIR | wc -l`
JFLAG=1
JNUM=`ls -l $JDIR | wc -l`
LFLAG=1
LNUM=`ls -l $LDIR | wc -l`
SFLAG=1
SNUM=`ls -l $SDIR | wc -l`
XFLAG=1
XNUM=`ls -l $XDIR | wc -l`
HFLAG=1
HNUM=`ls -l $HDIR | wc -l`
MFLAG=1
MNUM=`ls -l $MDIR | wc -l`
NFLAG=1
NNUM=`ls -l $NDIR | wc -l`
RFLAG=1
}
shift
;;
-u) Usage
;;
"") break
;;
*) Usage
;;
esac
do
shift
done
[ "$DELAY" ] && SLEEP="sleep $DELAY"
trap 'echo "Interrupted"; /usr/bin/X11/xset s default; exit 1' 1 2 3 15
/usr/bin/X11/xset s off
/usr/bin/X11/xsetroot -solid black
while :
do
[ "$EFLAG" ] && {
xroot $TFLAG -e -n $ENUM
$SLEEP
}
[ "$JFLAG" ] && {
xroot $TFLAG -j -n $JNUM
$SLEEP
}
[ "$HFLAG" ] && {
xroot $TFLAG -h -n $HNUM
$SLEEP
}
[ "$XFLAG" ] && {
xroot $TFLAG -s -n $XNUM
$SLEEP
}
[ "$SFLAG" ] && {
xroot $TFLAG -k -n $SNUM
$SLEEP
}
[ "$LFLAG" ] && {
xroot $TFLAG -l -n $LNUM
$SLEEP
}
[ "$RFLAG" ] && {
xroot $TFLAG -r
$SLEEP
}
[ "$MFLAG" ] && {
xroot $TFLAG -f -n $MNUM
$SLEEP
}
[ "$NFLAG" ] && {
xroot $TFLAG -s -n $NNUM
$SLEEP
}
done
/usr/bin/X11/xset s default